/*
 * SearchHistoryEntity.java
 *
 * Created on April 23, 2007, 3:43 PM
 *
 *  Life Logger v1.0 
    Copyright (C) 2007  Anand Kishore (anand@semanticvoid.com)

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License along
    with this program; if not, write to the Free Software Foundation, Inc.,
    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */

package com.semanticvoid.lifelogger.entity;

import java.util.Calendar;
import java.util.Date;

/**
 * This class extends the WebHistory entity. It represents the search queries logged
 * by Google Search.
 * @author anand kishore
 */
public class SearchHistoryEntity extends WebHistoryEntity {
    
    /**
     * The search KEYWORDS
     */
    private String keywords;
    
    /**
     * Creates a new instance of SearchHistoryEntity
     * @param guid the guid
     * @param link the link
     * @param pubDate the date
     * @param keywords the query terms
     */
    public SearchHistoryEntity(String guid, String link, Calendar pubDate, String keywords) {
        super(guid, link, pubDate);
        this.keywords = keywords;
    }

    /**
     * Get the query terms
     * @return the query terms
     */
    public String getKeywords() {
        return keywords;
    }

    /**
     * Set the query terms
     * @param keywords the query terms
     */
    public void setKeywords(String keywords) {
        this.keywords = keywords;
    }
    
    /**
     * Form string representation of the object
     * @return the string representation of the object
     */
    public String toString() {
        return this.getGuid() + "#" + this.getKeywords() + "#" + this.getPubDate() + "#" + this.getLink();
    }
}
